import { defineConfig } from 'vite'
import vue from '@vitejs/plugin-vue'
import { resolve } from 'path'
import qiankun from 'vite-plugin-qiankun'

export default defineConfig({
  plugins: [
    vue(),
    qiankun('app1', {
      useDevMode: true
    })
  ],
  server: {
    port: 8001,
    cors: true,
    origin: 'http://localhost:8001',
    headers: {
      'Access-Control-Allow-Origin': '*'
    },
    strictPort: true
  },
  resolve: {
    alias: {
      '@': resolve(__dirname, 'src')
    }
  },
  base: 'http://localhost:8001'
})